package com.myfoon.model.ejb;


import com.myfoon.model.cacheable.UserCache;
import com.myfoon.model.entity.User;

import java.util.List;
import java.util.Map;

import javax.ejb.Local;


@Local
public interface UserEJBLocal {
    public User persist(User user);
    public User merge(User user);
    public void remove(User user);    
    public User findByEmailAndPassword(String email, String passwd);
    
    public List<UserCache> getUsers(List<Long> userIDs);
    public Map getUsersMap(List<Long> userIDs);
    public List<Long> findFriendIDs(User user);
    /*
     * Find random Friends ID, Name, Photosmall 
     */
    public Object[] findRandomFriends(User user, int count);    
    /*
     * Find paged Friends ID, Name, Photosmall 
     */
    public Object[] findPagedFriends(User user, int start, int max);
        
    public Map<Long, List> findFriendINPs(User user, int first, int max);    
}
